% load feature file
p_file= fopen('features.f','rb');
n_dim = fread(p_file,1,'int');
n_pos = fread(p_file,1,'int');
data_pos = fread(p_file,[n_dim n_pos],'single')';
n_neg = fread(p_file,1,'int');
data_neg = fread(p_file,[n_dim n_neg],'single')';
all_feature = [data_pos;data_neg];
fclose(p_file);


% pos features
p_file= fopen('pos_features.f','rb');
n_dim = fread(p_file,1,'int');
n_pos = fread(p_file,1,'int');
data_pos = fread(p_file,[n_dim n_pos],'single')';
fclose(p_file);

% load hard features
p_file= fopen('negSet.f','rb');
n_hard = fread(p_file,1,'int');
data_hard = fread(p_file,[n_dim n_hard],'single')';
fclose(p_file);



p_weight = fopen('weighting.w','rb');
w = fread(p_weight,n_dim,'single');
fclose(p_weight);

score = all_feature*w;

inData =[data_pos;data_hard];
inScore = inData*w;
pos_score = data_pos*w;
view_pos = reshape(pos_score,48,[]);
bar(mean(view_pos'))
